﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chapter11.Code03.Code01
{
    public class ConvClass1
    {
        public int Val;

        //隐式转换
        public static implicit operator ConvClass2(ConvClass1 cc1)
        {
            ConvClass2 returnVal = new ConvClass2();
            returnVal.Val = cc1.Val;
            return returnVal;
        }
    }
}
